
<template>
  <!-- 公共同步返回组件 -->
  <div class="Banner">
    <van-swipe :autoplay="3000" class="BannerBox">
      <van-swipe-item v-for="item in BannerData" :key="item.commodityId" @click="$router.push('./goods?id='+item.commodityId)">
        <img :src="item.img"/>
      </van-swipe-item>
    </van-swipe>
  </div>
</template>

<script>
export default {
  name: 'banner',

  data () {
    return {}
  },
  components: {},
  props: {
    BannerData: Array
  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped lang="less">
.Banner {
  .BannerBox{
    width: 100%;
    background-color: #ffffff;
    img{
      height: 117.5px;
    }
  }
}
</style>
